package cn.edu.scau.cmi.xiaozecheng.simpleFactoryMethod;

import cn.edu.scau.cmi.xiaozecheng.domain.Meat;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TextArea;


/**
 * @author xiao
 * @date 2019/10/12/012 2:50 PM
 */
public class Controller {
    @FXML
    private TextArea resultText;
    @FXML
    private Button button;
    @FXML
    private ComboBox<String> choice;
    public void showResult() {
        Meat result = MeatSimpleFactory.getInstance(getChoice());
        resultText.appendText(result.cook() + '\n');
    }
    private String getChoice() {
        return choice.getValue();
    }
}
